#include <bits/stdc++.h>
using namespace std;
#define int long long
char buf[1<<23],*p1=buf,*p2=buf,obuf[1<<23],*O=obuf;
#define getchar() (p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++)
inline int read(){
    int x=0,f=1;char ch=getchar();
    while(!isdigit(ch)){if(ch=='-') f=-1;ch=getchar();}
    while(isdigit(ch)) x=x*10+(ch^48),ch=getchar();
    return x*f;
}
const int N=2e5+4;
int n,Q,a[N],f[N],sum[N],p[N];
void solve(){
    for(int i=1;i<=n;i++) sum[i]=sum[i-1]+a[i];
    int d=a[n]-sum[n-1],pos=n;
    f[n]=0;
    for(int i=n-1;i;i--) f[i]=abs(a[i+1]-f[i+1]);
    cout<<a[1]-a[2]+f[2]<<"\n";
}
signed main(){
    // freopen("pockets2.in","r",stdin);
    // freopen("pockets.out","w",stdout);
    n=read();
    for(int i=1;i<n;i++) a[i]=read();
    Q=read();
    while(Q--){
        a[n]=read();
        solve();
    }
    return 0;
}